<template>
  <div class="about">
    <el-button type="danger" @click="visiable=true" size="small">操作模态框-传递表单</el-button>
    <!-- 模态框的封装 -->
    <modal v-model="visiable" @close="cls">
      <el-form>
        <el-form-item>
          <el-input placeholder="用户名"/>
        </el-form-item>
        <el-form-item>
          <el-input placeholder="密码" type="password"/>
        </el-form-item>
      </el-form>
    </modal>
    <!-- 默认的模态框 -->
    <hr>
    <el-button type="danger" @click="visiable1=true" size="small">操作模态框</el-button>
    <modal v-model="visiable1">
      <div slot="title" style="color:#FF0000">测试标题</div>

      <i class="el-icon-circle-close" style="font-size: 22px;" slot="close"></i>
    </modal>
  </div>
</template>
<script>
import modal from "@/components/Dialog.vue";
export default{
  components:{
    modal,
  },
  data() {
    return {
      visiable:false,
      visiable1:false,
    }
  },
  methods:{
    cls(){
      alert("关闭");
    }
  }
}
</script>
